//
//  NYRedoSubmitAnswerRequest.m
//  NiuWaJiaoYu
//
//  Created by MinLison on 2018/1/9.
//  Copyright © 2018年 niuwaketang. All rights reserved.
//

#import "NYRedoSubmitAnswerRequest.h"

@implementation NYRedoSubmitAnswerRequest
+ (instancetype)requestWithType:(NYReDoType)type param:(NSDictionary *)param
{
        NYRedoSubmitAnswerRequest *request = [super requestWithParams:param];
        request.redoType = type;
        return request;
}
- (NetworkRequestType)requestType
{
        return NetwrokRequestTypePOST;
}

- (Class)contentType
{
        return [NYReDoSubmitAnswerModel class];
}
- (NSString *)url
{
        switch (self.redoType) {
                case NYReDoTypeGoodSubject:
                        return @"/member/goodQuestionResults";
                        break;
                case NYReDoTypeWrongSubject:
                        return @"/member/wrongQuestionResults";
                        break;
                default:
                        break;
        }
        return @"/member/goodQuestionResults";
}
- (NSMutableDictionary *)defaultParams
{
        return @{
                 kRequestKeyUser_ID : NOT_NULL_STRING_DEFAULT_EMPTY(NYUserManager.user_id),
                 kRequestKeyChannel : @(NYUserManager.channelID),
                 kRequestKeyLoginCode : NOT_NULL_STRING_DEFAULT_EMPTY(NYUserManager.logincode),
                 }.mutableCopy;
}
@end
